import Vue from 'vue'
import App from './App.vue'
import router from './router'
import FastClick from 'fastclick'
import { Toast } from 'vant'
import amfeFlexible from 'amfe-flexible'
import './style/public.scss'

Vue.config.productionTip = false

router.afterEach((to, from, next) => {
  document.title = to.meta.title
  document.body.scrollTop = 0
  document.documentElement.scrollTop = 0
})

FastClick.attach(document.body)

new Vue({
  router,
  Toast,
  amfeFlexible,
  render: h => h(App)
}).$mount('#app')
